package vo;

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 
 * @author Administrator 城市，省份，街道
 *
 */

@Entity
public class Address implements Serializable{

	// 使用序列自增长作为地址的唯一标识
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer addressid;

	// 城市
	private String city;

	// 省
	private String province;

	// 街道
	private String street;

	// 多个地址对应一个顾客
	@ManyToOne
	@JoinColumn(name = "c_tel")
	private Client customer;

	

	public Integer getAddressid() {
		return addressid;
	}

	public void setAddressid(Integer addressid) {
		this.addressid = addressid;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public Client getCustomer() {
		return customer;
	}

	public void setCustomer(Client customer) {
		this.customer = customer;
	}

	public Address(String city, String province, String street) {
		super();
		this.city = city;
		this.province = province;
		this.street = street;
	}

	public Address() {
		super();
	}

	
	
}
